Micron Document
Fox's Git Mirrors

Node / rns-mirrors / Reticulum-Go.git / files / docker / Dockerfile.speedtest

Displaying Raw • Download

docker/Dockerfile.speedtest 633735d797cc5f5d48cb2e22e8fd7cd743930daf (633735d7) Text, 1.20 KB

ARG GO_VERSION=1.26.6
FROM golang:${GO_VERSION}-alpine AS builder

ENV CGO_ENABLED=0
ENV GOOS=linux
ENV GOARCH=amd64
ENV GOFLAGS=-mod=vendor
ENV GOPROXY=off

WORKDIR /build

COPY go.mod go.sum ./
COPY vendor/ vendor/

COPY cmd/ cmd/
COPY internal/ internal/
COPY pkg/ pkg/

RUN go build \\
-ldflags='-w -s -extldflags "-static"' \\
-a -installsuffix cgo \\
-o reticulum-go \\
./cmd/reticulum-go

FROM busybox:1.37.0@sha256:870e815c3a50dd0f6b40efddb319c72c32c3ee340b5a3e8945904232ccd12f44

RUN adduser -D -s /bin/sh app

COPY --from=builder /build/reticulum-go /usr/local/bin/reticulum-go
COPY docker/speedtest/entrypoint.sh /usr/local/bin/speedtest-entrypoint.sh
COPY docker/speedtest/config /etc/reticulum-go/config.default

RUN chmod +x /usr/local/bin/reticulum-go /usr/local/bin/speedtest-entrypoint.sh \\
&& mkdir -p /data/storage/identities \\
&& chown -R app:app /data

USER app
WORKDIR /data

# TCPServerInterface default listen port
EXPOSE 4242/tcp

ENV RNS_CONFIG=/data \\
SPEEDTEST_IFACE=all \\
SPEEDTEST_BYTES=2097152 \\
SPEEDTEST_ANNOUNCE=120 \\
SPEEDTEST_JSON=1 \\
SPEEDTEST_PORT=4242

VOLUME ["/data"]

ENTRYPOINT ["/usr/local/bin/speedtest-entrypoint.sh"]

Served by rngit 1.5.2 - Generated in 0.02s